package cn.chi.org.mapper;

import cn.chi.org.domain.Department;
import cn.chi.org.query.DepartmentQuery;

import java.util.List;

/**
 * mapper接口
 */
public interface DepartmentMapper {
    void save(Department d);

    void remove(Long id);

    void update(Department d);

    Department listById(Long id );

    List<Department> listAll();

    /**
     * 统计条数
     * @param query
     * @return
     */
    Long count(DepartmentQuery query);

    /**
     * 高级查询
     * @param query
     * @return
     */
    List<Department> queryDate(DepartmentQuery query);

    void patchDelete(Long[] ids);

    List<Department> getTree();
}
